﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class WaveEffect : PostEffectBase
{

    //public Vector4 offset;

    //[Range(0.0f,10.0f)]
    //public float blurSpread = 2.5f;
    ////public Vector4 waveStrength;

    [Range(0.0f,1.0f)]
    public float waveStrength;


    //public float Brightness = 1f;
    //public float Saturation = 1f;
    //public float Contrast = 1f;

    private void OnRenderImage(RenderTexture source, RenderTexture destination)
    {
        if(_Material)
        {

            //int offset


            //_Material.SetVector("_Offsets", offset);
            _Material.SetVector("_WaveStrength", new Vector4(waveStrength, waveStrength));
            //_WaveStrength

            //_Material.SetFloat("_Brightness", Brightness);
            //_Material.SetFloat("_Saturation", Saturation);
            //_Material.SetFloat("_Contrast", Contrast);

            Graphics.Blit(source, destination, _Material);


            //Graphics.Blit(source, destination, _Material);
        }
    }
}
